package com.xiaoxing.zhinenghuacangku_linyi.di.module;

import com.jess.arms.di.scope.ActivityScope;
import com.xiaoxing.zhinenghuacangku_linyi.mvp.contract.LinYi_StorageContract;
import com.xiaoxing.zhinenghuacangku_linyi.mvp.model.LinYi_StorageModel;

import dagger.Module;
import dagger.Provides;


@Module
public class LinYi_StorageModule {
    private LinYi_StorageContract.View view;

    /**
     * 构建StorageModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public LinYi_StorageModule(LinYi_StorageContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    LinYi_StorageContract.View provideStorageView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    LinYi_StorageContract.Model provideStorageModel(LinYi_StorageModel model) {
        return model;
    }
}